﻿using Resn.WhuPub.BLL;
using Resn.WhuPub.DML;
using System;

namespace Resn.WhuPub.BLL
{
        /// <summary>
        /// 实现联系人反馈的属性和方法
        /// </summary>
        public class FeedbackFlow :Entity<FeedbackFlowModel>
        {
                #region 构造函数
                /// <summary>
                /// Initializes a new instance of the <see cref="FeedbackFlow"/> class.
                /// </summary>
                /// <param name="model">The model.</param>
                public FeedbackFlow(FeedbackFlowModel model)
                        : base(model)
                {
                }
                #endregion
                #region 属性

                #region 基本属性

                /// <summary>
                /// 获取或设置流程状态
                /// </summary>
                /// <value>
                /// 流程状态
                /// </value>
                public FeedbackFlowState State
                {
                        get
                        {
                                return (FeedbackFlowState)Enum.Parse(typeof(FeedbackFlowState), Model.State);
                        }
                        set
                        {
                                Model.State = value.ToString();
                        }
                }

                /// <summary>
                /// 获取或设置联系人标识
                /// </summary>
                /// <value>
                /// 联系人标识
                /// </value>
                public string ContactId
                {
                        get
                        {
                                return Model.ContactId;
                        }
                }


                

                /// <summary>
                /// 获取或设置反馈类型
                /// </summary>
                /// <value>
                /// 反馈类型
                /// </value>
                public FeedbackFlowType FeedbackFlowType
                {
                        get
                        {
                                return (FeedbackFlowType)Enum.Parse(typeof(FeedbackFlowType), Model.FeedbackFlowType);
                        }
                        set
                        {
                                Model.FeedbackFlowType = value.ToString();
                        }
                }

                /// <summary>
                /// 获取或设置反馈内容
                /// </summary>
                /// <value>
                /// 反馈内容
                /// </value>
                public string FeedbackFlowContent
                {
                        get
                        {
                                return Model.Content;
                        }
                        set
                        {
                                Model.Content = value;
                        }
                }

                /// <summary>
                /// 获取录入员工标识
                /// </summary>
                /// <value>
                /// 员工标识
                /// </value>
                public string EnteringEmployeeId
                {
                        get
                        {
                                return Model.EnteringEmployeeId;
                        }
                }

                /// <summary>
                /// 获取或设置录入时间
                /// </summary>
                /// <value>
                /// 录入时间
                /// </value>
                public DateTime EnteringTime
                {
                        get
                        {
                                return Model.EnteringTime;
                        }
                }

                /// <summary>
                /// 获取或设置审批员工标识
                /// </summary>
                /// <value>
                /// 审批员工标识
                /// </value>
                public string ApproveEmployeeId
                {
                        get
                        {
                                return Model.ApproveEmployeeId;
                        }
                        set
                        {
                                Model.ApproveEmployeeId = value;
                        }
                }

                /// <summary>
                /// 获取或设置审批时间
                /// </summary>
                /// <value>
                /// 审批时间
                /// </value>
                public DateTime ApproveTime
                {
                        get
                        {
                                return Model.ApproveTime;
                        }
                        set
                        {
                                Model.ApproveTime = value;
                        }
                }

                /// <summary>
                /// 获取或设置审批意见
                /// </summary>
                /// <value>
                /// 审批意见
                /// </value>
                public string ApproveContent
                {
                        get
                        {
                                return Model.ApproveContent;
                        }
                        set
                        {
                                Model.ApproveContent = value;
                        }
                }

                #endregion 基本属性

                

                #endregion 属性

                #region 方法

                /// <summary>
                /// 获取指定标识的对象
                /// </summary>
                /// <param name="id">标识</param>
                /// <returns></returns>
                public static FeedbackFlow Select(string id)
                {
                        return Select<FeedbackFlow>(id);
                }

                #endregion

        }
}